package com.zk.shop.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * 商品类
 */
public class Goods implements Serializable {
    private int goodsId;        //商品编号
    private String goodsName;   //商品名字
    private double price;       //商品价格
    private int goodsNum;       //商品数量
    private String image;       //商品图片
    private String goodsContent;//商品详情
    private User user;          //user对象
    private int views;          //浏览次数
    private Date goodsTime;     //商品发布时间
    private Sorts sorts;        //商品所属板块


    public Goods() {
    }

    public Goods(int goodsId, String goodsName, double price, String image) {
        this.goodsId = goodsId;
        this.goodsName = goodsName;
        this.price = price;
        this.image = image;
    }

    public Goods(String goodsName, double price, int goodsNum, String goodsContent, User user, Date goodsTime) {
        this.goodsName = goodsName;
        this.price = price;
        this.goodsNum = goodsNum;
        this.goodsContent = goodsContent;
        this.user = user;
        this.goodsTime = goodsTime;
    }

    public Goods(String goodsName, double price, String image, String goodsContent, User user, Sorts sorts) {
        this.goodsName = goodsName;
        this.price = price;
        this.image = image;
        this.goodsContent = goodsContent;
        this.user = user;
        this.sorts = sorts;
    }

    public Goods(int goodsId) {
        this.goodsId = goodsId;
    }

    public Goods(String goodsName, double price, int goodsNum, String image, String goodsContent, User user, Date goodsTime, Sorts sorts) {
        this.goodsName = goodsName;
        this.price = price;
        this.goodsNum = goodsNum;
        this.image = image;
        this.goodsContent = goodsContent;
        this.user = user;
        this.goodsTime = goodsTime;
        this.sorts = sorts;
    }

    public Goods(String goodsName, double price, int goodsNum, String image, String goodsContent, User user, Date goodsTime) {
        this.goodsName = goodsName;
        this.price = price;
        this.goodsNum = goodsNum;
        this.image = image;
        this.goodsContent = goodsContent;
        this.user = user;
        this.goodsTime = goodsTime;
    }

    public Goods(String goodsName, double price, int goodsNum, String image, String goodsContent, User user, Sorts sorts) {
        this.goodsName = goodsName;
        this.price = price;
        this.goodsNum = goodsNum;
        this.image = image;
        this.goodsContent = goodsContent;
        this.user = user;
        this.sorts = sorts;
    }

    public Goods(int goodsId, String goodsName, double price, int goodsNum, String image, String goodsContent, User user, int views, Date goodsTime, Sorts sorts) {
        this.goodsId = goodsId;
        this.goodsName = goodsName;
        this.price = price;
        this.goodsNum = goodsNum;
        this.image = image;
        this.goodsContent = goodsContent;
        this.user = user;
        this.views = views;
        this.goodsTime = goodsTime;
        this.sorts = sorts;
    }


    public String getGoodsContent() {
        return goodsContent;
    }

    public void setGoodsContent(String goodsContent) {
        this.goodsContent = goodsContent;
    }

    public int getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(int goodsId) {
        this.goodsId = goodsId;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getGoodsNum() {
        return goodsNum;
    }

    public void setGoodsNum(int goodsNum) {
        this.goodsNum = goodsNum;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public int getViews() {
        return views;
    }

    public void setViews(int views) {
        this.views = views;
    }

    public Date getGoodsTime() {
        return goodsTime;
    }

    public void setGoodsTime(Date goodsTime) {
        this.goodsTime = goodsTime;
    }

    public Sorts getSorts() {
        return sorts;
    }

    public void setSorts(Sorts sorts) {
        this.sorts = sorts;
    }
}
